package com.fit.entities.presenceOnClasses;

import java.util.Date;

import javax.persistence.AssociationOverride;
import javax.persistence.AssociationOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.apache.tapestry5.beaneditor.NonVisual;

import com.fit.entities.classes.Classes;
import com.fit.entities.course.Course;
import com.fit.entities.homework.Homework;
import com.fit.entities.student.Student;
import com.fit.entities.user.User;

@Entity
@Table(name = "presenceOnClasses")
public class PresenceOnClasses {

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@NonVisual
	@Column(name = "presenceOnClasses_id")
	private Long presenceOnClassesId;

	@ManyToOne(optional = false)
	@JoinColumn(name = "id")
	private User user;
	@ManyToOne(optional = false)
	@JoinColumn(name = "classes_id")
	private Classes classes;

	@Column(name = "comment")
	private String comment;


	public Long getPresenceOnClassesId() {
		return presenceOnClassesId;
	}

	public void setPresenceOnClassesId(Long presenceOnClassesId) {
		this.presenceOnClassesId = presenceOnClassesId;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public Classes getClasses() {
		return classes;
	}

	public void setClasses(Classes classes) {
		this.classes = classes;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public boolean equals(Object o) {
		if (this == o)
			return true;
		if (o == null || getClass() != o.getClass())
			return false;

		PresenceOnClasses that = (PresenceOnClasses) o;

		return true;
	}

}
